package com.financing.platform.dao.impl;
 



import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IActivitesDao;
import com.financing.platform.dto.ActivitesDTO;
import com.financing.platform.dto.ActivitesExpandDTO;
import com.financing.platform.util.SqlName;



@Repository("activitesDao")
public class ActivitesDaoImpl extends BaseDaoImpl implements   IActivitesDao {



	@Override
	public ActivitesDTO searchActivitesByCode(String activitesCode) throws SQLException {
		ActivitesDTO result = (ActivitesDTO)this.sqlMapClient.queryForObject(SqlName.activitesSearchByCode,activitesCode);
		return result;
	}
	
	@SuppressWarnings("unchecked")
	@Override
	public List<ActivitesExpandDTO> searchActivitesExpand(String activitesCode) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.activitesSearchExpand,activitesCode);
	}

	@Override
	public int updateAcitivitesNowAmount(ActivitesDTO dto) throws SQLException{
		return this.sqlMapClient.update(SqlName.activitesUpdateNowAmount, dto);
	}

}
